#!/bin/sh
if ping -4 -c 1 -w 1 -I  www.baidu.com > /dev/null; then
	puncher_num=`ps | grep -c "puncher "`
	echo $puncher_num
	if [ "$puncher_num" -lt "4" ]; then
	  if [ ! -f "/mnt/skyeye/etc/puncher.conf" ]; then
      		if [ -f "/mnt/skyeye/etc/factory/puncher.conf" ] ; then
         		cp /mnt/skyeye/etc/factory/puncher.conf /mnt/skyeye/etc
      		fi
  	  fi
	  #echo 0 > /sys/class/graphics/fb0/blank
	  /usr/netplug/bin/puncher -f /mnt/skyeye/etc/puncher.conf -F &
	  echo -e "\033[1;33mStart puncher\033[m" > /dev/tty0
	fi
fi
